package com.thrc.borrow.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.thrc.borrow.dao.QuestionDao;
import com.thrc.borrow.entity.Question;
import com.thrc.borrow.vo.QuestionVo;

@Service
public class QuestionService implements BaseService<Question, QuestionVo> {

	@Autowired
	private QuestionDao questionDao;

	@Override
	public QuestionVo selectById(Question t) {
		return questionDao.selectById(t);
	}

	@Override
	public List<QuestionVo> selectAll(Question t) {
		return questionDao.selectAll(t);
	}

	@Override
	public int selectCount(Question t) {
		return questionDao.selectCount(t);
	}

	@Override
	public List<QuestionVo> selectByPage(Question t) {
		t.setStartRow(t.getPageIndex(), t.getPageSize());
		return questionDao.selectByPage(t);
	}

	@Override
	public void update(Question t) {
		questionDao.update(t);
	}
	
	
	@Override
	public void delete(Question t) {
		questionDao.delete(t);
	}

	@Override
	public void insert(Question t) {
		questionDao.insert(t);
	}

}
